
    <link rel="stylesheet" href="__PUBLIC__/Chart/jquery.jOrgChart.css"/>
<include file="Public:header" />

	
<style>
.bg-primary .widget-summary .summary .title, .bg-primary .widget-summary .summary .amount,
.ibox-title{
color : #d6bf7d
}
.panel-body,label,button,.progress .progress-bar,.panel,.btn{
border-radius:2px !important;
}
.sidebar-left .sidebar-header .sidebar-toggle{
border-radius: 0 0 0 2px;
}
.panel-heading{
border-radius:2px 2px 0 0;
}
select{
border-radius:0px;
}
.sidebar-left{
background:#383838;
box-shadow:-5px 0 0 #383838 inset;
}
.sidebar-left{
width:230px;
}
.summary .amount{
color:rgba(255, 255, 255, 0.72) !important;
}
.modal-content{
border-radius:2px;
padding:1em;
}

.nav .open > a,.nav .open > a:hover{
background-color:#585757;
}
.header{
height:70px !important;
}
 @media screen and (max-width: 414px) {
.inner-wrapper{
padding-top:10px !important;
}
.dash-h4{
word-break:break-word !important;
}
strong.dash{
font-size:15px !important;
}
}
@media screen and (min-width: 415px) {
.dash-tile{
padding:10px
}

.inner-wrapper{
padding-top:46px !important;
}
}
</style>
<style>
.card img {
	max-width: 120px;;
}

a.btn {
	background: #f5f5f5;
	padding: 10px !important;
}
.regbtn{
color:red !important;
}
a{
color:black
}
.title {
	font-size: 25px;
}

.img-responsive {
	height: 35px !important;
	width: 52%;
}

.mobile {
	display: none;
}

@media screen and (max-width: 760px) {
	.desktop {
		display: none;
	}
	.mobile {
		display: block;
	}
}

@media screen and (max-width: 410px) {
	.popover_ .content {
		width: 300px !important;
	}
}
</style>

<style>
.popover{
	max-width:100%;
}
.content .col-md-5,
.content .dark{
    background: #333;
    color: #fff;
    font-weight: 400;
    text-align:center;
}
.content .grey{
    background: #c3c3c3;
}
.content label{
	margin-bottom:0;
}
.line{

   // border-top: 1px solid #333;
   // border-bottom: 1px solid #333;
    }
    .line:first-child{
    border-top:0;
    
    }
    .line:last-child{
    border-bottom:0;
    }
.content > .row > div{
	margin-bottom : 1px;
}
.popover-content{
	padding:1px 14px;
}
.btn > p{
	margin:0;
}
.triangle{
  width: 0; 
  height: 0; 
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-top: 20px solid #ea0d0d;
}
.uptriangle{
  width: 0; 
  height: 0; 
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
  border-bottom: 20px solid #ea0d0d;
}
.popover{
padding:0 !important;
}
</style>
	
<section role="main" class="content-body">
    <header class="page-header" style="box-shadow: none;"></header>
    <!-- start: page -->
		<div class="row">
			<div class="col-xs-12 col-md-12 col-lg-12 ">
				<div class="panel-heading">
					<h4 class="panel-title">安置组织图</h4>
				</div>
				<div class=" panel-body" style="z-index:-1;">
					<form class="form form-horizontal" action="{:U('Team/pedigreeChart')}" method="get" style="margin-top: 0;">
						<div class="form-row row-fluid">
							<div class="col-lg-12">
								<h4>请输入团队会员用户名</h4>
								<input type="text" name="username" id="tipue_search_input" placeholder="" class="form-control" value="{$Think.get.username}">
								<br>
								<button class="btn btn-primary" type="submit" id="tipue_search_button" style="padding: 4px 12px;">
									<span class="icon16 icomoon-icon-search-3"></span>搜索</button>
							</div>
						</div>
					</form>
				</div>
				<div class="clear"></div>
				<div class=" panel-body" style="overflow:scroll;margin-top:-130px;">
					
					<div class="col-xs-12 col-md-12 col-lg-12" style="margin-top:130px;">
							<div class="">
										<div class="jOrgChart">
											<table cellpadding="0" cellspacing="0" border="0" style="">
												<tbody>
													<tr class="node-cells">
														<td class="node-cell" colspan="6">
															<div class="node ui-draggable ui-droppable" style="cursor: n-resize;overflow:visible">
																<table style="color:#fff;border:1px solid #fff;background-color:black;display:none;" border="1" id="table{$chart['1']['1']['username']}" >
																	<tr>
																		<td colspan="3"> <a href="#">{$chart['1']['1']['username']}</a></td>
																	</tr>
																	<tr>
																		<td>等级</td>
																		<td colspan="2">{$leavel_type[$chart['1']['1']['leavel']]['name']}</td>
																	</tr>
																	<tr>
																		<td>左区业绩</td>
																		<td>中区业绩</td>
																		<td>右区业绩</td>
																	</tr>
																	<tr>
																		<td>{$chart['1']['1']['all_yeji1']}</td>
																		<td>{$chart['1']['1']['all_yeji2']}</td>
																		<td>{$chart['1']['1']['all_yeji3']}</td>
																	</tr>
																	<tr>
																		<td>左区剩余业绩</td>
																		<td>中区剩余业绩</td>
																		<td>右区剩余业绩</td>
																	</tr>
																	<tr>
																		<td>{$chart['1']['1']['yeji1']}</td>
																		<td>{$chart['1']['1']['yeji2']}</td>
																		<td>{$chart['1']['1']['yeji3']}</td>
																	</tr>
																</table>
																<table style="color:border:1px solid #fff;width:100%;position:relative;" >
																			<tr>
																				<img data-toggle="popover_" data-content="
																				<div class='content' style='width:300px;z-index:25;'>
																					<div class='row line' >
																						<div class='col-md-5 col-xs-5'><label>用户名</label></div>
																					<div class='col-md-7 col-xs-7 grey'>{$chart['1']['1']['username']}</div>
																					</div>
																					<div class='row line ' >
																						<div class='col-md-5 col-xs-5'><label>级别</label></div>
																						<div class='col-md-7 col-xs-7'>{$leavel_type[$chart['1']['1']['leavel']]['name']}</div>
																					</div>
																					<div class='row line ' >
																						<div class='col-md-5 col-xs-5 dark '><label>参与日期</label></div>
																						<div class='col-md-7 col-xs-7'>{$chart['1']['1']['reg_time']|getDateFormat}</div>
																					</div>
																					<div class='row line dark'  >
																						<div class='col-md-5 col-xs-5 dark'></div>
																						<div class='col-md-7 col-xs-7'><div class='row'><div class='col-md-4 col-xs-4 dark' align='center'>左</div><div class='dark col-md-4 col-xs-4' align='center'>中</div><div class='dark col-md-4 col-xs-4' align='center'>右</div></div></div>
																					</div>
																					<div class='row line' >
																						<div class='col-md-5 col-xs-5'><label>总累计业绩</label></div>
																						<div class='col-md-7 col-xs-7'><div class='row'><div class='grey col-md-4 col-xs-4' align='center'>{$chart['1']['1']['all_yeji1']}</div><div class='grey col-md-4 col-xs-4' align='center'>{$chart['1']['1']['all_yeji2']}</div><div class='grey col-md-4 col-xs-4' align='center'>{$chart['1']['1']['all_yeji3']}</div></div></div>
																					</div>
																					<div class='row line' >
																						<div class='col-md-5 col-xs-5'><label>剩余业绩</label></div>
																						<div class='col-md-7 col-xs-7'><div class='row'><div class='col-md-4 col-xs-4' align='center'>{$chart['1']['1']['yeji1']}</div><div class='col-md-4 col-xs-4' align='center'>{$chart['1']['1']['yeji2']}</div><div class='col-md-4 col-xs-4' align='center'>{$chart['1']['1']['yeji3']}</div></div></div>
																					</div>
																				</div>
																				" src="__PUBLIC__/Home/images/1.gif" alt="us1" width="50" class="" data-original-title="" title="">
																			</tr>
																			<tr>
																				<td style="color:black;">{$chart['1']['1']['username']}</td>
																			</tr>
																</table>
															</div>
														</td>
													</tr>
													<tr>
														<td colspan="6">
															<div class="line down"></div>
														</td>
													</tr>
													<tr>
														<td class="line left">&nbsp;</td>
														<td class="line right top">&nbsp;</td>
														<td class="line left top">&nbsp;</td>
														<td class="line right top">&nbsp;</td>
														<td class="line left top">&nbsp;</td>
														<td class="line right">&nbsp;</td>
													</tr>
													<tr>
														<?php foreach($chart['2'] as $k=>$v){ ?>
														<td class="node-container" colspan="2">
															<table cellpadding="0" cellspacing="0" border="0">
																<tbody>
																	<tr class="node-cells">
																		<td class="node-cell" colspan="6">
																			<div class="node ui-draggable ui-droppable" style="cursor: n-resize;">
																				<notempty name="v">
																				<table style="color:border:1px solid #fff;width:100%;" >
																							<img data-toggle="popover_" data-content="
																								<div class='content' style='width:300px'>
																								<div class='row line' >
																									<div class='col-md-5 col-xs-5'><label>用户名</label></div>
																								<div class='col-md-7 col-xs-7 grey'>{$v['username']}</div>
																								</div>
																								<div class='row line ' >
																									<div class='col-md-5 col-xs-5'><label>级别</label></div>
																									<div class='col-md-7 col-xs-7'>{$leavel_type[$v['leavel']]['name']}</div>
																								</div>
																								<div class='row line ' >
																									<div class='col-md-5 col-xs-5 dark '><label>参与日期</label></div>
																									<div class='col-md-7 col-xs-7'>{$v['reg_time']|getDateFormat}</div>
																								</div>
																								<div class='row line dark'  >
																									<div class='col-md-5 col-xs-5 dark'></div>
																									<div class='col-md-7 col-xs-7'><div class='row'><div class='col-md-4 col-xs-4 dark' align='center'>左</div><div class='dark col-md-4 col-xs-4' align='center'>中</div><div class='dark col-md-4 col-xs-4' align='center'>右</div></div></div>
																								</div>
																								<div class='row line' >
																									<div class='col-md-5 col-xs-5'><label>总累计业绩</label></div>
																									<div class='col-md-7 col-xs-7'><div class='row'><div class='grey col-md-4 col-xs-4' align='center'>{$v['all_yeji1']}</div><div class='grey col-md-4 col-xs-4' align='center'>{$v['all_yeji2']}</div><div class='grey col-md-4 col-xs-4' align='center'>{$v['all_yeji3']}</div></div></div>
																								</div>
																								<div class='row line' >
																									<div class='col-md-5 col-xs-5'><label>剩余业绩</label></div>
																									<div class='col-md-7 col-xs-7'><div class='row'><div class='col-md-4 col-xs-4' align='center'>{$v['yeji1']}</div><div class='col-md-4 col-xs-4' align='center'>{$v['yeji2']}</div><div class='col-md-4 col-xs-4' align='center'>{$v['yeji3']}</div></div></div>
																								</div>
																							</div>
																							" src="__PUBLIC__/Home/images/1.gif" alt="us1" width="50" class="" data-original-title="" title="">
																							<tr>
																								<td style="color:black;">{$v['username']}</td>
																							</tr>
																				</table>
																				<else/>
																					<a class="btn btn-primary regbtn" style="color:red;background: #f5f5f5;padding: 10px !important;text-shadow: 0px -1px 0px rgba(0,0,0,0.25);box-sizing: border-box;box-sizing: border-box;white-space: normal; border-color: #357ebd;border-radius: 2px !important;" href="{:U('Team/register',['jiename'=>$chart['1']['1']['username'],'quyu'=>$k])}"><p> 注册</p></a>
																						<br>	
																				</notempty>
																			</div>
																		</td>
																	</tr>
																	<tr>
																		<td colspan="6">
																			<div class="line down"></div>
																		</td>
																	</tr>
																	<tr>
																		<td class="line left">&nbsp;</td>
																		<td class="line right top">&nbsp;</td>
																		<td class="line left top">&nbsp;</td>
																		<td class="line right top">&nbsp;</td>
																		<td class="line left top">&nbsp;</td>
																		<td class="line right">&nbsp;</td></tr>
																	<tr>
																		<?php 
																			foreach($chart['3'] as $key=>$val){
																				$num1=$k*3-3;
																				$num2=$k*3;
																				if($key<=$num1||$key>$num2){
																					continue;
																				}
																			?>
																		<?php if($val){ ?>
																		<td class="node-container" colspan="2">
																			<table style="color:#fff;border:1px solid #fff;width:100%;display:none;" border="1" >
																				<tr>
																					<td colspan="3"> <a href="{:U('Team/pedigreeChart',['username'=>$val['username']])}">{$val['username']}</a></td>
																				</tr>
																				<tr>
																					<td>等级</td>
																					<td colspan="2">{$leavel_type[$val['leavel']]['name']}</td>
																				</tr>
																				<tr>
																					<td>左区业绩</td>
																					<td>中区业绩</td>
																					<td>右区业绩</td>
																				</tr>
																				<tr>
																					<td>{$val['all_yeji1']}</td>
																					<td>{$val['all_yeji2']}</td>
																					<td>{$val['all_yeji3']}</td>
																				</tr>
																				<tr>
																					<td>左区剩余业绩</td>
																					<td>中区剩余业绩</td>
																					<td>右区剩余业绩</td>
																				</tr>
																				<tr>
																					<td>{$val['yeji1']}</td>
																					<td>{$val['yeji2']}</td>
																					<td>{$val['yeji3']}</td>
																				</tr>
																			</table>
																				<table style="color:border:1px solid #fff;width:100%;" >
																							<img data-toggle="popover_" data-content="
																								<div class='content' style='width:300px'>
																								<div class='row line' >
																									<div class='col-md-5 col-xs-5'><label>用户名</label></div>
																								<div class='col-md-7 col-xs-7 grey'>{$val['username']}</div>
																								</div>
																								<div class='row line ' >
																									<div class='col-md-5 col-xs-5'><label>级别</label></div>
																									<div class='col-md-7 col-xs-7'>{$leavel_type[$val['leavel']]['name']}</div>
																								</div>
																								<div class='row line ' >
																									<div class='col-md-5 col-xs-5 dark '><label>参与日期</label></div>
																									<div class='col-md-7 col-xs-7'>{$val['reg_time']|getDateFormat}</div>
																								</div>
																								<div class='row line dark'  >
																									<div class='col-md-5 col-xs-5 dark'></div>
																									<div class='col-md-7 col-xs-7'><div class='row'><div class='col-md-4 col-xs-4 dark' align='center'>左</div><div class='dark col-md-4 col-xs-4' align='center'>中</div><div class='dark col-md-4 col-xs-4' align='center'>右</div></div></div>
																								</div>
																								<div class='row line' >
																									<div class='col-md-5 col-xs-5'><label>总累计业绩</label></div>
																									<div class='col-md-7 col-xs-7'><div class='row'><div class='grey col-md-4 col-xs-4' align='center'>{$val['all_yeji1']}</div><div class='grey col-md-4 col-xs-4' align='center'>{$val['all_yeji2']}</div><div class='grey col-md-4 col-xs-4' align='center'>{$val['all_yeji3']}</div></div></div>
																								</div>
																								<div class='row line' >
																									<div class='col-md-5 col-xs-5'><label>剩余业绩</label></div>
																									<div class='col-md-7 col-xs-7'><div class='row'><div class='col-md-4 col-xs-4' align='center'>{$val['yeji1']}</div><div class='col-md-4 col-xs-4' align='center'>{$val['yeji2']}</div><div class='col-md-4 col-xs-4' align='center'>{$val['yeji3']}</div></div></div>
																								</div>
																							</div>
																							" src="__PUBLIC__/Home/images/1.gif" alt="us1" width="50" class="" data-original-title="" title="">
																							<tr>
																								<td style="color:black;">{$v['username']}</td>
																							</tr>
																				</table>
																		</td>
																		<?php }else{ ?>
																		<td class="node-container" colspan="2">
																			<table cellpadding="0" cellspacing="0" border="0">
																				<tbody>
																					<tr class="node-cells">
																						<td class="node-cell" colspan="2">
																							<div class="node ui-draggable ui-droppable">
																								<a class="btn btn-primary regbtn" style="color:red;background: #f5f5f5;padding: 10px !important;text-shadow: 0px -1px 0px rgba(0,0,0,0.25);box-sizing: border-box;box-sizing: border-box;white-space: normal; border-color: #357ebd;border-radius: 2px !important;" href="/Team/register/jiename/001/quyu/1.html">
																									<p>注册</p>
																								</a>
																							</div>
																						</td>
																					</tr>
																				</tbody>
																			</table>
																		</td>
																		<?php }?>
																		<?php } ?>
																	</tr>
																</tbody>
															</table>
														</td>
														<?php } ?>
													</tr>
												</tbody>
											</table>
										</div>
							</div>
					</div>
				</div>
			</div>
			
        </div>
    </section>
<script> 
        $(document).ready(function(){
            $('[data-toggle="popover_"]').popover({
				placement: 'top',
				trigger : 'hover',
				html : true,
				popover: {
					image: [],
					link: [],
					air: []
				  },
                }); 
        });

</script>
<include file="Public:footer" />